<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>车辆修改</title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/styles.css">
</head>
<body style="background: transparent;">
    <div class="form-container">
        <h2>车辆修改</h2>
        <form id="vehicleForm" style="display: block;" method="post" action="<%=request.getContextPath()%>/Veh/UpdateVehServlet">
        <input type="text" value="${editVeh.id}" name="id" hidden="hidden">
        <div class="form-group">
            <label for="licensePlate">车牌号码</label>
            <input type="text" id="licensePlate" name="licensePlate" class="form-control" value="${editVeh.licensePlate}" required>
        </div>
        <div class="form-group">
            <label for="model">车辆型号</label>
            <input type="text" id="model" name="model" class="form-control" value="${editVeh.model}" required>
        </div>
        <div class="form-group">
            <label for="status">车辆状态</label>
            <select id="status" name="status" class="form-control" value="${editVeh.status}" required>
                <option value="可用">可用</option>
                <option value="维修中">维修中</option>
                <option value="报废">报废</option>
                <option value="使用中">使用中</option>
                <option value="保养中">保养中</option>
            </select>
        </div>
        <div class="form-group">
            <label for="currentDriver">当前驾驶员</label>
            <input type="text" id="currentDriver" name="currentDriver" class="form-control" value="${editVeh.currentDriver}">
        </div>
        <div class="form-group">
            <label for="purchaseDate">购买日期</label>
            <input type="date" id="purchaseDate" name="purchaseDate" class="form-control" value="${editVeh.purchaseDate}" required>
        </div>
        <div class="form-group">
            <label for="totalMileage">累计里程 (km)</label>
            <input type="number" id="totalMileage" name="totalMileage" class="form-control" min="0" value="${editVeh.totalMileage}" required>
        </div>
        <div class="form-footer">
            <button type="submit" class="btn">提交</button>
        </div>
    </form>
    </div>
</body>
</html> 